package cn.ffcs.uec.recordsApproval.dao.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import cn.ffcs.uec.recordsApproval.dao.ActRunTaskDao;
import cn.ffcs.uom.common.dao.BaseDaoImpl;

@Repository("actRunTaskDao")
@Transactional
public class ActRunTaskDaoImpl extends BaseDaoImpl implements ActRunTaskDao {

	@Override
	public List<Map<String, Object>> getRuTasks(String procInstId) {
		String sql = " SELECT * FROM ACT_RU_TASK T WHERE T.PROC_INST_ID_ = ? ";
		List<Object> params = new ArrayList<Object>();
		params.add(procInstId);
		return getJdbcTemplate().queryForList(sql, params.toArray());
	}

	@Override
	public List<Map<String, Object>> getRuTasksByProcDefId(String procDefId) {
		String sql = " SELECT * FROM ACT_RU_TASK T WHERE T.PROC_DEF_ID_ = ? ";
		List<Object> params = new ArrayList<Object>();
		params.add(procDefId);
		return getJdbcTemplate().queryForList(sql, params.toArray());
	}
	
	
	

	

}
